# Maintainer: Justin Kromlinger <hashworks@archlinux.org>

pkgname=kiwix-desktop
pkgver=2.3.1
pkgrel=2
pkgdesc="Offline reader for Web content, especially intended to make Wikipedia available offline"
url="https://github.com/kiwix/kiwix-desktop"
arch=("loong64" "x86_64")
license=("GPL3")
depends=("qt5-base" "qt5-webengine" "libkiwix" "aria2")
makedepends=("qt5-tools")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('799d887efd6a855aefe27452b1e3c02da3b443b1ea19c961b7d58dc55e019342')

build() {
	cd "${pkgname}-${pkgver}"
	export CFLAGS+=" ${CPPFLAGS}"
	export CXXFLAGS+=" ${CPPFLAGS}"
	qmake PREFIX="/usr"
	make
}

package() {
	cd "${pkgname}-${pkgver}"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	make INSTALL_ROOT="$pkgdir/" install
}
